#include <vector>
#include <fstream>
#include <iostream>

#include "libshapes.h"

using namespace std;

int main()
{

    ////TEST 1
    ofstream outfile;
    outfile.open("input.txt");
    for (int i = 0; i < 15; i++) {
        int x = rand() % 3;
        switch(x) {
            case 0:
                outfile << "R " << rand() % 10 << ' ' << rand() % 10 << ' ' << rand() % 10 << ' ' << rand() % 10 << '\n';
                break;
            case 1:
                outfile << "C " << rand() % 10 << ' ' << rand() % 10 << ' ' << rand() % 10 << '\n';
                break;
            case 2:
                outfile << "S " << rand() % 10 << ' ' << rand() % 10 << ' ' << rand() % 10 << '\n';
                break;
        }
    }
    outfile.close();

    ///TEST2
    Container x = Container();
    x.getDataFromFile();

    for (int i = 0; i < x.getSize(); i++) {
        x.cont[i]->changePos(rand() % 100, rand() % 100);
    }

    x.printShapesToFile("test2");

}
